Field of the Invention
The present invention relates to a file name producing apparatus that produces a file name of an image, and more particularly to a file name producing apparatus that can produce a proper file name.
Description of the Related Art
An electrophotographic image forming apparatus includes an MFP (Multi Function Peripheral) provided with a scanner function, a facsimile function, a copying function, a function as a printer, a data communication function, and a server function, a facsimile machine, a copying machine, and a printer.
Nowadays, the image forming apparatus is widely spread in offices and homes as a scanner, a copying machine, a printer, a facsimile machine, and a digital multi function peripheral, which include image readers. Some image forming apparatuses include an ADF (Auto Document Feeder) that supplies a sequence of documents to the image reader one by one. The image forming apparatus including the ADF can automatically supply the documents including a plurality of sheets to the image reader one by one.
A file of an image (input image) of the document read with the image reader is stored in a storage unit of the image forming apparatus. In the case where a user searches the file from the storage unit after the file is stored, the user frequently determines whether the file is the file to be searched from the file name. Therefore, desirably the file name reflecting a content of the file is added in storing the file of the input image.
As to a method for adding the file name of the input image, there is a method in which the image forming apparatus automatically produces the file name. According to the method for automatically producing the file name, the user can avoid a trouble of manually producing the file name. In the method for automatically producing the file name, for example, the image forming apparatus selects one character string from a plurality of character strings, which are extracted from the input image through OCR (Optical Character Recognition) processing, and the selected character string is used as the file name of the input image. Through the OCR processing, a space between characters or character strings can be output as a space character code. For example, Documents 1 and 2 disclose technologies related to the file name producing processing and the OCR processing.
In the technology disclosed in Document 1, character recognition is performed to a given region (preset region) of the image, a size or a color of the character or the character string, which is obtained by the character recognition, is determined, and the character having a predetermined size or color is used as the file name of the image file.
In the technology disclosed in Document 2, document image data is observed in a unit of line, a range where the characters are continued between the spaces is extracted as a character phrase, a starting point, a middle point, and an ending point of the character phrase are detected in each extracted character phrase, and values of coordinates of array orders in the lines are compared and checked. In the technology disclosed in Document 2, a string of the character phrase of the array order is determined to be left-aligned when starting coordinates agree with each other within an allowable range, the string of the character phrase of the array order is determined to be centered when middle coordinates agree with each other within the allowable range, and the string of the character phrase of the array order is determined to be right-aligned when ending coordinates agree with each other within the allowable range.    [Document 1] Japanese Patent Laying-Open No. 2005-56315    [Document 2] Japanese Patent Laying-Open No. 08-315069
When the image forming apparatus performs the OCR processing, desirably the character is extracted while a layout of the input image is retained as much as possible. Therefore, in the case where the OCR processing is performed to the input image in which a distance between the characters constituting the character string is large, the image forming apparatus outputs the character string in which one or at least two spaces (space character codes) are inserted between the characters.
On the other hand, sometimes the image forming apparatus outputs the character string in which the space is inserted between the characters due to the mistaken recognition of the character string even when the distance between the characters constituting the character string is short. As a result, unfortunately the image forming apparatus inserts the unnecessary space in the file name, and therefore the file name of the input image becomes unsuitable (an unintended file name of the user).
Particularly, in the case where the character string that becomes a candidate of the file name is located in a photographic region of the input image or a shaded background, the mistaken recognition of the character string is easily generated to produce the unintended file name of the user. In order to prevent the mistaken recognition, desirably the OCR processing is not performed to the photographic region of the input image, but the OCR processing is performed only to the character region. However, in the related art, the OCR processing is also performed to the photographic region.
FIG. 8 is a view schematically illustrating the input image in which the photographic region includes the character string. In FIG. 8, almost all character strings are indicated by characters of “x” and “%”.
Referring to FIG. 8, the character string exists in each region indicated by a dotted line in the photographic region. In the case where the OCR processing is performed to the character string, the image forming apparatus easily performs the mistaken recognition of the character string. Particularly, in the character string in a region A of FIG. 8, the image forming apparatus frequently recognizes a head character as the space. As a result, sometimes the character string including the unnecessary head space is produced as the file name of the input image.